package edu.pku.sei.modeler.neditor.part.policy;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;

import edu.pku.sei.modeler.neditor.ui.CommandCreationFactory;

public class NodeEditPolicy extends GraphicalNodeEditPolicy {

	@Override
	protected Command getConnectionCompleteCommand(
			CreateConnectionRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Command getReconnectSourceCommand(ReconnectRequest request) {
		return CommandCreationFactory.getChangeLinePointCommand(request.getConnectionEditPart(), request, true);
	}

	@Override
	protected Command getReconnectTargetCommand(ReconnectRequest request) {
		return CommandCreationFactory.getChangeLinePointCommand(request.getConnectionEditPart(), request, false);
	}

}
